package com.linkoog.devtools.code_generator.setting.configurable.ui;

import com.linkoog.devtools.code_generator.database.domain.TypeMapping;
import com.linkoog.devtools.code_generator.setting.configurable.ui.type.TypeMappingTableModelEditor;

import javax.swing.*;
import java.awt.*;

public class TypeMappingPanel {

    private JPanel myMainPanel;

    private TableModelEditor<TypeMapping> typeMappingEditor;

    public TypeMappingPanel() {
        typeMappingEditor = new TypeMappingTableModelEditor();
        JComponent typeMappingEditorComponent = typeMappingEditor.createComponent();
        myMainPanel.add(typeMappingEditorComponent, BorderLayout.CENTER);
    }

    public JPanel getMyMainPanel() {
        return myMainPanel;
    }

    public TableModelEditor<TypeMapping> getTypeMappingEditor() {
        return typeMappingEditor;
    }

    {
// GUI initializer generated by IntelliJ IDEA GUI Designer
// >>> IMPORTANT!! <<<
// DO NOT EDIT OR ADD ANY CODE HERE!
        $$$setupUI$$$();
    }

    /**
     * Method generated by IntelliJ IDEA GUI Designer
     * >>> IMPORTANT!! <<<
     * DO NOT edit this method OR call it in your code!
     *
     * @noinspection ALL
     */
    private void $$$setupUI$$$() {
        myMainPanel = new JPanel();
        myMainPanel.setLayout(new BorderLayout(0, 0));
    }

    /**
     * @noinspection ALL
     */
    public JComponent $$$getRootComponent$$$() {
        return myMainPanel;
    }
}
